<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>orderBy</title>
</head>
<body>
<div id="order">
    搜索：<input type="text" name="Search" v-model="name">
    <ul>
        <li v-for="user in users | orderBy 'name' order | filterBy name in 'name'">{{user.name}}</li>
    </ul>
    <button @click="order = order * -1">Reverse</button>
</div>
<script src="../js/libs/vue.js"></script>
<script>
    var order = new Vue({
        el: '#order',
        name: '',
        data: {
            order: 1,
            users: [{name: 'li'}, {name: 'xu'}, {name: 'wang'}]
        }
    });
</script>
</body>
</html>